<template>
	<view>
		<!-- info -->
		<view class="info">
			<view class="left">
				<text class="desc">可用积分</text>
				<text class="num">22</text>
				<view class="bottom">
					<text class="opt-1">积分明细</text>
					<view class="middle" style="margin: 0px 20rpx; width: 1rpx; background-color: black;"></view>
					<text class="opt-2">兑换积分</text>
				</view>
			</view>
			<view class="right">
				<image src="https://placehold.co/100x100"></image>
			</view>
		</view>

		<view class="shops" @click="toPage('/pages/shop/detail')">
			<view class="shop-item">
				<image src="https://placehold.co/150x100"></image>
				<text class="title">奶茶一杯</text>
				<view class="info">
					<text class="price">2400</text>
					<text class="desc">积分</text>
				</view>
			</view>
			<view class="shop-item">
				<image src="https://placehold.co/150x100"></image>
				<text class="title">奶茶一杯</text>
				<view class="info">
					<text class="price">2400</text>
					<text class="desc">积分</text>
				</view>
			</view>
			<view class="shop-item">
				<image src="https://placehold.co/150x100"></image>
				<text class="title">奶茶一杯</text>
				<view class="info">
					<text class="price">2400</text>
					<text class="desc">积分</text>
				</view>
			</view>
		</view>

		<view style="font-size: 12px; text-align: center; color:#afafaf ;">没有更多了</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			toPage(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>
<style>
	page {
		background-color: #f2f2f2;
	}
</style>
<style scoped lang="less">
	.shops {

		margin: 20rpx 0rpx;
		background-color: #fff;
		align-items: center;
		padding: 20rpx;
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;

		.shop-item {
			padding: 10rpx 0rpx;
			width: 50%;
			display: flex;
			flex-direction: column;
			overflow: hidden;
			align-items: center;

			image {
				width: 300rpx;
				height: 200rpx;
			}

			.title {
				font-size: 16px;
				// font-weight: 600;
				width: 100%;
				margin-left: 50rpx;
				margin-top: 10rpx;
				text-align: start;
				display: block;
			}

			.info {
				display: flex;
				align-items: center;
				justify-content: flex-start;
				width: 100%;
				margin-left: 50rpx;
				margin-top: 10rpx;

				.price {
					font-size: 18px;
					color: #c08536;
				}

				.desc {
					margin: 10rpx 0rpx;
					margin-left: 20rpx;
					font-size: 12px;
					color: #b4b4b4;
				}
			}
		}
	}


	.info {
		display: flex;
		justify-content: space-between;
		background-color: #fff;
		align-items: end;

		.bottom {
			width: 100%;
			display: flex;
			justify-content: flex-start;

			.opt-1 {
				font-size: 12px;
				color: #7c7979;
			}

			.opt-2 {
				font-size: 12px;
				color: #7c7979;
			}
		}

		.left {
			flex-grow: 1;
			padding: 20rpx;
			display: flex;
			flex-direction: column;
			align-items: flex-start;
			justify-content: center;

			.desc {
				margin-top: 30rpx;
				font-size: 16px;
				color: #7c7979;
			}

			.num {
				font-size: 30px;
				font-weight: bold;
				margin: 20rpx 0px;
			}
		}

		.right {
			padding: 20rpx;

			image {
				width: 200rpx;
				height: 200rpx;
			}
		}
	}
</style>